package com.heima.day10.huanchongliu;

import java.io.*;

public class Huan02 {
    public static void main(String[] args) throws IOException {
        //缓存流，一次读写一个字节数组，进行文件拷贝
        //创建一个字节输入流
        BufferedInputStream bi = new BufferedInputStream(new FileInputStream("Day10\\books.sql"));
        //创建一个字节输出流
        BufferedOutputStream bu = new BufferedOutputStream(new FileOutputStream("Day10\\coop.sql"));
        int len;
        byte[]bytes=new byte[1024];
        while((len=bi.read(bytes))!=-1){
            bu.write(bytes,0,len);
        }
        bi.close();
        bu.close();
    }
}
